package com.raymond.thread.impl.scheduled;

import com.raymond.thread.manager.annotation.ManagerScheduledThread;
import com.raymond.thread.manager.annotation.ManagerThread;
import com.raymond.thread.manager.bean.ScheduledThreadDefinition;
import com.raymond.thread.manager.scheduled.BaseScheduledThread;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * 主备切换线程
 *
 * @author :  raymond
 * @version :  V1.0
 * @date :  2020-10-27 14:21
 */
@ManagerScheduledThread(managerThread = @ManagerThread(threadName = "主备切换线程"), period = 10000, strategy = ScheduledThreadDefinition.Strategy.WITH_FIXED_DELAY)
@Component
public class ScheduledTestThread extends BaseScheduledThread {
    private static final Logger logger = LoggerFactory.getLogger(ScheduledTestThread.class);


    @Override
    protected void execute() {
        System.out.println("定时线程执行");
    }



}
